<?php 
$this->breadcrumbs=array(
	'Карта сайта',
);
?>

<h1>Карта сайта</h1>
<div class="grid-view">
	<div class="sitemap-content">
		<ul class="sitemap-level-1">
			<li>
				<a href="<?php echo Yii::app()->createUrl('site/sitemap'); ?>"><?php echo CHtml::encode(Yii::app()->params['sitename']); ?></a>
				<ul class="sitemap-level-2">
					<?php foreach ($categories as $key => $category) : ?>
						<li>
							<span class="btn <?php echo isset($category->items) ? 'minus' : 'minus-disable'; ?>"></span><span class="icon icon-folder"></span><a href="<?php echo Yii::app()->createUrl('categoryContent/update',array('id'=>$category->id)); ?>"><?php echo CHtml::encode($category->name); ?></a>
							<ul class="sitemap-level-3">
								<?php foreach ($category->items as $key => $item) : ?>
									<li><span class="btn minus-disable"></span><span class="icon icon-file"></span><a href="<?php echo Yii::app()->createUrl('content/update',array('id'=>$item->id)); ?>"><?php echo CHtml::encode($item->name); ?></a></li>
								<?php endforeach ?>
							</ul>
						</li>
					<?php endforeach ?>
				</ul>
			</li>
		</ul>
	</div>
</div>